package com.slz3.business.module.socialManagement.socShow.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.socialManagement.socShow.domain.SocShow;
import com.slz3.business.module.socialManagement.socShow.domain.SocShowCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SocShowResAtomic {

    static Mono<ServerResponse> add_$SocShowUpdateLock(ServerRequest req, SocShow socShow) {
        return SocShowResSafeValid.add(req, socShow) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.add(req, socShow);
    }

    public static Mono<ServerResponse> delete_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.delete(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$SocShowUpdateLock(ServerRequest req, SocShow socShow) {
        return SocShowResSafeValid.modify(req, socShow) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.modify(req, socShow);
    }

    static Mono<ServerResponse> info_$SocShowUpdateLock(ServerRequest req) {
        return SocShowResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.auditSubmit(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.audit(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.auditReject(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.usingEnable(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$SocShowUpdateLock(ServerRequest req, SocShowCondition socShowCondition) {
        return SocShowResSafeValid.usingDisable(req, socShowCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                SocShowResExecutor.usingDisable(req);
    }
}
